package com.googlecode.iiddefecttracker.service;

import java.util.List;

import com.googlecode.iiddefecttracker.dao.ProjectDao;
import com.googlecode.iiddefecttracker.domain.Project;

/**
 * default implementation of {@link ProjectService}.
 */
public class ProjectServiceImpl implements ProjectService {
    
    private final ProjectDao projectDao;
    
    public ProjectServiceImpl(final ProjectDao projectDao) {
        this.projectDao = projectDao;
    }
    
    public List<Project> findProjects() {
        return projectDao.findAllProjects();
    }
    
    public Project getProjectById(final Long projectId) {
        return projectDao.getProjectById(projectId);
    }
    
    public void saveProject(final Project project) {
        projectDao.saveProject(project);
    }
    
}
